#include "m0wig.h"
#include "ui_m0wig.h"
#include <QDebug>
#include "globalval.h"

M0Wig::M0Wig(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::M0Wig)
{
    ui->setupUi(this);
}

M0Wig::~M0Wig()
{
    delete ui;
}

void M0Wig::dataUpSlot(QByteArray data)
{
    qDebug()<<data;
}

void M0Wig::on_pushButton_2_clicked()
{
    /*发送给/app/data/down主题*/
    QMQTT::Message msg;
    msg.setTopic("/app/data/down");
    msg.setPayload("123");
    GlobalVal::mqtt->publish(msg);
}
